#ifndef BCM_GPIO_H
#define BCM_GPIO_H
#include <php.h>

#define MODE_READ 0
#define MODE_SET 1
#define MODE_CLR 2
#define MODE_INPUT_READ 3

#define PULL_UP 0
#define PULL_DOWN 1
#define NO_PULL 2

#define GPIO_BEGIN 0
#define GPIO_END 1
#define NO_ACTION 2

#define NO_PIN 40 // Some big number that's beyond the connector's pin count
//#define DEBUG_OFF 0
//#define DEBUG_ON 1

ZEND_BEGIN_ARG_INFO(arginfo_gpio_bcm_pin_reset, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_gpio_bcm_pin_ctrl, 0)
    ZEND_ARG_INFO(0, pin_no)
    ZEND_ARG_INFO(0, pin_mode)
    ZEND_ARG_INFO(0, pull)
ZEND_END_ARG_INFO()


PHP_FUNCTION(gpio_bcm_pin_reset);

/**
  pin_no:
  pull:
  pin_mode:
  return integer
    0 for ok
   -1 for bcm2835_init error
   -2 for mode error
*/
PHP_FUNCTION(gpio_bcm_pin_ctrl);

#endif